﻿using Kratos.Framework.ContentManagement.Models;
using Kratos.Framework.Extensions;
using Kratos.Framework.Infrastructures;
using Kratos.Framework.Repositories;

namespace Kratos.Modules.Test.Services.Impl
{
    public class TestService : ITestService
    {
        private readonly IRepository<ActionPermission> _rpP;

        public TestService(IRepository<ActionPermission> rpP)
        {
            _rpP = rpP;
        }

        public PageList<ActionPermission> GetAll(int p)
        {
            return _rpP.GetAll().ToPageList(p, 40);
        }

        public void Save(ActionPermission model)
        {
            _rpP.SaveOrUpdate(model);
        }
    }
}
